<template>
	<div class="demo1">
		<h2>我是Demo1组件</h2>
		<h3>{{msg1}}</h3>
		<button @click="sendMsg">把我的msg给我下面的弟弟</button>
	</div>
</template>

<script>
	export default {
		name:'Demo1',
		data() {
			return {
				msg1:'你好啊！'
			}
		},
		methods:{
			sendMsg(){
				this.$bus.$emit('xiaozhu',this.msg1)
			}
		}
	}
</script>

<style>
	.demo1{
		background-color: orange;
		padding: 10px;
	}
</style>